#include <iostream>
#include <list>

using namespace std;

class Student
{
public:
    int m_num;
    string m_name;
};

template <typename T>
class Link
{
public:
    class LinkIterator;
    class Node
    {
    public:
        Node(T * t) : m_t(t)
        {

        }
        T m_t;
        Node *next;
    };

    Link();
    Link(T *head);
    Link(const Link<T> &link);
    Link(Link<T> &&link);
    Link(const std::initializer_list<T> &ilist);

    bool empty();
    bool push_back(const T &t);
    bool insert(const LinkIterator &it, const T &t);
    LinkIterator begin();
    LinkIterator end();
    LinkIterator earse(const LinkIterator &it);
    
    typedef LinkIterator iterator;
    class LinkIterator
    {
    public:
        LinkIterator();
        LinkIterator(Node * head);
        
        LinkIterator  operator++(int num);
        LinkIterator  operator++();
        bool operator!=(const LinkIterator &it);
        T operator*()
        {
            return *this;
        }
        ~LinkIterator();
    private:
        Node *m_head;
    };

    
    friend ostream & operator<<(ostream &out,const Link<T> &link);

    ~Link();
private:
    Node *m_head;
};

template <typename T>
ostream & operator<<(ostream &out,const Link<T> &link)
{

}

int main(int argc, char **argv)
{
    list<int> li = {1,2,3,4,5};
    list<int> li2 = {5,6,7,8};
    list<Student> li3;

    list<int>::iterator it = li.begin();;
    it++;
    //list<int> li3 = li + li2;
    
    Link<int> link = {1,2,3,4,5,6,7};
    Link<int>::iterator it2 = link.begin();
    it2++;
    ++it2;

    for(auto it = link.begin(); it != link.end(); ++it)
    {
        cout << *it << endl;
    }
    cout << link;

    return 0;
}